package com.lzj.demo.design.abstractfactory;

import com.lzj.demo.design.abstractfactory.workshop.EGMCacheAdapter;
import com.lzj.demo.design.abstractfactory.workshop.IIRCacheAdapter;
import lombok.extern.slf4j.Slf4j;

@Slf4j
public class Test {
    public static void main(String[] args) throws InstantiationException, IllegalAccessException {
        CacheService proxy_EGM = JdkProxyFactory.getProxy(CacheService.class, EGMCacheAdapter.class);
        proxy_EGM.set("userName","Faker");
        log.info("缓存服务EGM测试:{}",proxy_EGM.get("userName"));
        CacheService proxy_IIR = JdkProxyFactory.getProxy(CacheService.class, IIRCacheAdapter.class);
        proxy_IIR.set("userName","Faker");
        log.info("缓存服务IIR测试:{}", proxy_IIR.get("userName"));
    }
}
